package com.woniuxy.redis.lock.configuration;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * description: RedissonConfiguration <br>
 * date: 2022/1/8 10:37 上午 <br>
 * author: shesaifei <br>
 * version: 1.0 <br>
 */

//Redisson配置文件

@Configuration
public class RedissonConfiguration {
    @Bean
    public RedissonClient redissonClient() {
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.0.102:6379");
        config.useSingleServer().setPassword("123");
        return Redisson.create(config);
    }
}
